package com.hyts.serialize.factory;

import com.hyts.serialize.base.BeanFactory;
import com.hyts.serialize.bean.FstBean;
import lombok.Builder;
import org.nustaq.serialization.FSTConfiguration;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.serialize.factory
 * author:Libo/Alex
 * create-date:2019-06-21 22:43
 * copyright:libo-hyts-github
 * email:libo2dev@aliyun.com
 * description:此类主要用于: 工厂方法
 */
@Builder
public class FstBeanFactory implements BeanFactory<FstBean,FstBean> {


    @Override
    public FstBean create(FstBean param) {
        return param;
    }

    @Override
    public FstBean create() {
       return FstBean.builder().fstConfiguration(FSTConfiguration.createDefaultConfiguration()).build();
    }
}
